<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Global Configuration Keys  Reference</title>
    <link rel="stylesheet" type="text/css" href="css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="css/highlight.css" />
    <meta charset="utf-8">
    <script src="js/jquery.min.js" defer></script>
    <script src="js/jazzy.js" defer></script>
    
    <script src="js/lunr.min.js" defer></script>
    <script src="js/typeahead.jquery.js" defer></script>
    <script src="js/jazzy.search.js" defer></script>
  </head>
  <body>

    <a name="//apple_ref/objc/Section/Global Configuration Keys" class="dashAnchor"></a>

    <a title="Global Configuration Keys  Reference"></a>

    <header class="header">
      <p class="header-col header-col--primary">
        <a class="header-link" href="index.html">
          TrustKit Docs
        </a>
        
      </p>
    
      <p class="header-col--secondary">
        <form role="search" action="search.json">
          <input type="text" placeholder="Search documentation" data-typeahead>
        </form>
      </p>
    
        <p class="header-col header-col--secondary">
          <a class="header-link" href="https://github.com/datatheorem/TrustKit">
            <img class="header-icon" src="img/gh.png"/>
            View on GitHub
          </a>
        </p>
    
    </header>

    <p class="breadcrumbs">
      <a class="breadcrumb" href="index.html">TrustKit Reference</a>
      <img class="carat" src="img/carat.png" />
      Global Configuration Keys  Reference
    </p>

    <div class="content-wrapper">
      <nav class="navigation">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Initalizing TrustKit.html">Initalizing TrustKit</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/TrustKit.html">TrustKit</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Implementing Pinning Validation.html">Implementing Pinning Validation</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/TSKPinningValidator.html">TSKPinningValidator</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/TSKTrustDecision.html">TSKTrustDecision</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Setting up a Validation Callback.html">Setting up a Validation Callback</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Setting up a Validation Callback.html#/c:TSKPinningValidatorCallback.h@T@TSKPinningValidatorCallback">TSKPinningValidatorCallback</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/TSKPinningValidatorResult.html">TSKPinningValidatorResult</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Setting up a Validation Callback.html#/c:TSKPinningValidatorCallback.h@T@TKSDomainPinningPolicy">TKSDomainPinningPolicy</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/TSKTrustEvaluationResult.html">TSKTrustEvaluationResult</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Global Configuration Keys.html">Global Configuration Keys</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Global Configuration Keys.html#/c:TSKTrustKitConfig.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Global Configuration Keys.html#/c:@kTSKSwizzleNetworkDelegates">kTSKSwizzleNetworkDelegates</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Global Configuration Keys.html#/c:@kTSKPinnedDomains">kTSKPinnedDomains</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Global Configuration Keys.html#/c:@kTSKIgnorePinningForUserDefinedTrustAnchors">kTSKIgnorePinningForUserDefinedTrustAnchors</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Domain Configuration Keys.html">Domain Configuration Keys</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Domain Configuration Keys.html#/c:TSKTrustKitConfig.h@T@TSKDomainConfigurationKey">TSKDomainConfigurationKey</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Domain Configuration Keys.html#/c:@kTSKPublicKeyHashes">kTSKPublicKeyHashes</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Domain Configuration Keys.html#/c:@kTSKEnforcePinning">kTSKEnforcePinning</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Domain Configuration Keys.html#/c:@kTSKIncludeSubdomains">kTSKIncludeSubdomains</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Domain Configuration Keys.html#/c:@kTSKExcludeSubdomainFromParentPolicy">kTSKExcludeSubdomainFromParentPolicy</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Domain Configuration Keys.html#/c:@kTSKReportUris">kTSKReportUris</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Domain Configuration Keys.html#/c:@kTSKDisableDefaultReportUri">kTSKDisableDefaultReportUri</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Domain Configuration Keys.html#/c:@kTSKExpirationDate">kTSKExpirationDate</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Other Constants.html">Other Constants</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Other Constants.html#/c:@TrustKitVersion">TrustKitVersion</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Other Constants.html#/c:@kTSKAlgorithmEcDsaSecp256r1">kTSKAlgorithmEcDsaSecp256r1</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Other Constants.html#/c:@kTSKAlgorithmEcDsaSecp384r1">kTSKAlgorithmEcDsaSecp384r1</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Other Constants.html#/c:@kTSKAlgorithmRsa2048">kTSKAlgorithmRsa2048</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Other Constants.html#/c:@kTSKAlgorithmRsa4096">kTSKAlgorithmRsa4096</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Other Constants.html#/c:@kTSKPublicKeyAlgorithms">kTSKPublicKeyAlgorithms</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Other Type Definitions.html">Other Type Definitions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Other Type Definitions.html#/c:TSKTrustKitConfig.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">

        <section class="section">
          <div class="section-content">
            <h1>Global Configuration Keys</h1>
            
          </div>
        </section>

        <section class="section">
          <div class="section-content">
            <div class="task-group">
              <div class="task-name-container">
                <a name="/Configuration%20Keys"></a>
                <a name="//apple_ref/objc/Section/Configuration Keys" class="dashAnchor"></a>
                <a href="#/Configuration%20Keys">
                  <h3 class="section-name">Configuration Keys</h3>
                </a>
              </div>
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:TSKTrustKitConfig.h@T@TSKGlobalConfigurationKey"></a>
                    <a name="//apple_ref/objc/Type/TSKGlobalConfigurationKey" class="dashAnchor"></a>
                    <a class="token" href="#/c:TSKTrustKitConfig.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A global, App-wide configuration key that can be set in the pinning policy.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">typedef</span> <span class="n">NSString</span> <span class="o">*</span><span class="n">TSKGlobalConfigurationKey</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">typealias</span> <span class="kt">TSKGlobalConfigurationKey</span> <span class="o">=</span> <span class="kt">NSString</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/Global%20Configuration%20Keys%20-%20Required"></a>
                <a name="//apple_ref/objc/Section/Global Configuration Keys - Required" class="dashAnchor"></a>
                <a href="#/Global%20Configuration%20Keys%20-%20Required">
                  <h3 class="section-name">Global Configuration Keys - Required</h3>
                </a>
              </div>
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@kTSKSwizzleNetworkDelegates"></a>
                    <a name="//apple_ref/objc/Constant/kTSKSwizzleNetworkDelegates" class="dashAnchor"></a>
                    <a class="token" href="#/c:@kTSKSwizzleNetworkDelegates">kTSKSwizzleNetworkDelegates</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A boolean. If set to <code>YES</code>, TrustKit will perform method swizzling on the App&rsquo;s
<code>NSURLConnection</code> and <code>NSURLSession</code> delegates in order to automatically add SSL pinning
validation to the App&rsquo;s connections. This option can only be used if TrustKit is 
initialized in singleton mode; default value is <code>NO</code>.</p>

<p>Swizzling allows enabling pinning within an App without having to find and modify each
and every instance of <code>NSURLConnection</code> or <code>NSURLSession</code> delegates.
However, it should only be enabled for simple Apps, as it may not work properly in several
scenarios including:</p>

<ul>
<li>Apps with complex connection delegates, for example to handle client authentication
via certificates or basic authentication.</li>
<li>Apps where method swizzling of the connection delegates is already performed by another
module or library (such as Analytics SDKs).</li>
<li>Apps that do no use <code>NSURLSession</code> or <code>NSURLConnection</code> for their connections.</li>
</ul>

<p>In such scenarios or if the developer wants a tigher control on the App&rsquo;s networking
behavior, <code>kTSKSwizzleNetworkDelegates</code> should be set to <code>NO</code>; the developer should then
manually add pinning validation to the App&rsquo;s authentication handlers.</p>

<p>See the <code><a href="Classes/TSKPinningValidator.html">TSKPinningValidator</a></code> class for instructions on how to do so.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Global Configuration Keys.html#/c:TSKTrustKitConfig.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a></span> <span class="n">kTSKSwizzleNetworkDelegates</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="k">let</span> <span class="nv">kTSKSwizzleNetworkDelegates</span><span class="p">:</span> <span class="kt">String</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@kTSKPinnedDomains"></a>
                    <a name="//apple_ref/objc/Constant/kTSKPinnedDomains" class="dashAnchor"></a>
                    <a class="token" href="#/c:@kTSKPinnedDomains">kTSKPinnedDomains</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A dictionary with domains (such as <em><a href="http://www.domain.com">www.domain.com</a></em>) as keys and dictionaries as values.</p>

<p>Each entry should contain domain-specific settings for performing pinning validation when
connecting to the domain, including for example the domain&rsquo;s public key hashes. A list of
all domain-specific keys is available in the <q>Domain-specific Keys</q> sections.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Global Configuration Keys.html#/c:TSKTrustKitConfig.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a></span> <span class="n">kTSKPinnedDomains</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="k">let</span> <span class="nv">kTSKPinnedDomains</span><span class="p">:</span> <span class="kt">String</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/Global%20Configuration%20Keys%20-%20Optional"></a>
                <a name="//apple_ref/objc/Section/Global Configuration Keys - Optional" class="dashAnchor"></a>
                <a href="#/Global%20Configuration%20Keys%20-%20Optional">
                  <h3 class="section-name">Global Configuration Keys - Optional</h3>
                </a>
              </div>
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@kTSKIgnorePinningForUserDefinedTrustAnchors"></a>
                    <a name="//apple_ref/objc/Constant/kTSKIgnorePinningForUserDefinedTrustAnchors" class="dashAnchor"></a>
                    <a class="token" href="#/c:@kTSKIgnorePinningForUserDefinedTrustAnchors">kTSKIgnorePinningForUserDefinedTrustAnchors</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A boolean. If set to <code>YES</code>, pinning validation will be skipped if the server&rsquo;s certificate
chain terminates at a user-defined trust anchor (such as a root CA that isn&rsquo;t part of OS X&rsquo;s
default trust store) and no pin failure reports will be sent; default value is <code>YES</code>.</p>

<p>This is useful for allowing SSL connections through corporate proxies or firewalls. See
<q>How does key pinning interact with local proxies and filters?</q> within the Chromium security
FAQ at <a href="https://www.chromium.org/Home/chromium-security/security-faq">https://www.chromium.org/Home/chromium-security/security-faq</a> for more information.</p>

<p>Only available on macOS.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">extern</span> <span class="k">const</span> <span class="n"><a href="Global Configuration Keys.html#/c:TSKTrustKitConfig.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a></span>
    <span class="n">kTSKIgnorePinningForUserDefinedTrustAnchors</span></code></pre>

                        </div>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="k">let</span> <span class="nv">kTSKIgnorePinningForUserDefinedTrustAnchors</span><span class="p">:</span> <span class="kt">String</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </div>
        </section>

      </article>
    </div>
    <section class="footer">
      <p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
      <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
    </section>
  </body>
</div>
</html>
